package mapper;

import servlet.HttpServlet;

import java.util.ArrayList;
import java.util.List;

/**
 * @author lbq
 * @version 1.0
 * @date 2021/1/23 0:29
 */
public class EasyHost {

    private List<EasyContext> contexts;
    private String host;

    public EasyHost() {
        this.contexts = new ArrayList<>();
    }

    public List<EasyContext> getContexts() {
        return contexts;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public static class EasyContext {

        private List<EasyWrapper> wrappers;
        private String name;

        public EasyContext() {
            this.wrappers = new ArrayList<>();
        }

        public List<EasyWrapper> getWrappers() {
            return wrappers;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }

    public static class EasyWrapper {

        private HttpServlet servlet;
        private String servletName;
        private String servletClass;
        private String url;

        public HttpServlet getServlet() {
            return servlet;
        }

        public void setServlet(HttpServlet servlet) {
            this.servlet = servlet;
        }

        public String getServletName() {
            return servletName;
        }

        public void setServletName(String servletName) {
            this.servletName = servletName;
        }

        public String getServletClass() {
            return servletClass;
        }

        public void setServletClass(String servletClass) {
            this.servletClass = servletClass;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }
    }
}
